package com.asura.app.wechat.repository.net;

import android.support.test.runner.AndroidJUnit4;

import com.asura.app.wechat.common.WechatModuleProvider;
import com.asura.app.wechat.repository.model.Tweet;
import com.asura.app.wechat.repository.model.UserInfo;

import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;

import java.util.List;

/**
 * Created by Asura on 2017/12/27.
 */
@RunWith(AndroidJUnit4.class)
public class WechatApiTest {

    private WechatApi wechatApi;

    @Before
    public void setUp() throws Exception{
        wechatApi = WechatModuleProvider.getInstance().getWechatApi();
    }

    @Test
    public void fetchUserInfo() throws Exception {
        UserInfo userInfo = wechatApi.fetchUserInfo().blockingGet();
    }

    @Test
    public void fetchMomentTweets() throws Exception {
        List<Tweet> tweets = wechatApi.fetchMomentTweets().blockingGet();

    }

}